<ul class="widget-list">
  <?php 
  	foreach((array)$category as $k => $v){
		$products = $this->data->get_all('ca_product',"cate_id='{$v['cate_id']}'",'*',"my_order DESC,pro_id ASC");
  ?>
  <li id="extended-categories-<?=$k+1==count($category) ? "4" : "3";?>" class="widget-container widget_extended-categories">
    <h3 class="widget-title"><?=$v['category'];?></h3>
    <ul>
    <?php foreach((array)$products as $key => $val){?>
      <li class="cat-item cat-item-36">
        <div class="avhec-widget-line"><a href="<?=base_url('/home/products_detail/?p='.$val['pro_id']);?>" title="<?=$val['name'];?>"><?=$val['name'];?></a></div>
      </li>
    <?php }?>
    </ul>
  </li>
  <?php }?>
  <li id="text-6" class="widget-container widget_text">
    <div class="textwidget"></div>
  </li>
</ul>
